global.createTorrent = require('create-torrent')
global.debug = require('debug')('instant.io')
global.dragDrop = require('drag-drop')
global.path = require('path')
global.prettyBytes = require('pretty-bytes')
global.throttle = require('throttleit')
global.thunky = require('thunky')
global.uploadElement = require('upload-element')

global.trackerUrl = 'tracker.rssmv.com:9800'
global.trackerUrls = ['ws://' + trackerUrl, 'udp://' + trackerUrl]
global.WEBTORRENT_ANNOUNCE = trackerUrls
createTorrent.announceList = []

global.WebTorrent = require('webtorrent')
global.xhr = require('xhr')

global.util = require('./util')

if (!WebTorrent.WEBRTC_SUPPORT) {
  util.error('This browser is unsupported. Please use a browser with WebRTC support.')
}
